package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum BuildType implements HashID {

    SLABFLOOR ("0", "板楼"),
    TOWER ("1", "塔楼"),
    SLABFTOWER("2", "板塔结合"),
    LOW("3", "低层"),
    HIGH("4", "高层"),
    SUPERHIGH ("5", "超高层"),
    ROW("6", "联排"),
    DONG("7", "独栋"),
    SPELL("8", "双拼"),
    SKYVILLA ("9", "空中别墅"),
    OTHER("10", "其它"),
    ;


    private final String id;
    private final String desc ;

    public static BuildType get(String desc) {
        BuildType[] buildTypes = values();
        for (BuildType buildType : buildTypes) {
            if (buildType.getDesc().equals(desc)) {
                return buildType;
            }
        }
        return null;
    }

    private BuildType(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
